Discover quickest way to learn python, include the articles, news, trends, analysis and practical advice about quickest way to learn python on alibabacloud.com
is closed will not be saved. However, by pressing the up and down keys in the keyboard in an interactive environment, you can look for historical commands, but it is a transient memory, and when you exit the program, these commands cease to exist.Using the command line is inconvenient if you need to write a longer program. You can now edit the script using a text editor. You can create a new window by clicking on the file at the top left of the idle and then selecting the new Windows menu, as s
Recently viewed: stupid ways to learn python (learn python the hard way)Contents:
Translator Preface
The stupid method is more simple
Exercise 0: Preparing for work
Exercise 1: First program
Exercise 2: Annotations and well numbers
Exercise 3: Numerical and ma
others ' methods. Make a good analysis of the results of your work and other people's work and the different pros and cons, and explain the reasons. For areas that are not very good at the moment, analyze the problem and make it a future work.
Conclusion. The contribution to this article is summarized again. It is necessary to summarize and refine the theory and method, as well as to explain the contribution and conclusion in the experiment. The conclusion is to convince the readers and point
) returns an int of type 4). Input () handles what you enter as Python code, which can be a security issue. Unless there is a special need for input (), it is generally recommended to use raw_input () to interact with the user. Note: Python3 input () receives the STR type by default. x = Int (raw_input ()) Converts the user input string int () to an integer raw_input () in parentheses to enclose the hint message y = raw_input ("Name?") 7.
We have already learned about half of it, and the lower part is more interesting. We will learn logical judgment.
Before learning in the lower half, we should first perform a test. This test will be a bit difficult and we need to modify others' code. As a programmer, it is inevitable to modify other people's code, and these people often think that their code is perfect.
These people are stupid and do not care about others' feelings. Good programmers a
Ref: http://net.tutsplus.com/tutorials/the-best-way-to-learn-python/ postMark Dunne
Python is more popular than ever, and is being used everywhere from back-endWeb servers, to front-end game development, and everything in. python is a true general purpose language and is qu
hand and make sense of why.2. To find a practical project practiced hand. The best thing is to have a real project to do. Can find a few classmates together to make a website and so on. Note that real projects are not necessarily commercial projects.3. It's a good idea to find someone who already has python. Ask him a little bit about the idea of learning to plan (it's also a way), and then find him in a j
: OutputClass: Declaring a CategoryEXEC: Re-executing the following, exec ("Print ' Hello World '), can be refactored as a command. For example, the obtained variable as a variable.In: Checks whether an element is in a list, a tuple, or a dictionary, and if the check is a dictionary, it is usually checked for key.Raise: Throws a custom exception.Continue: Continue the loop without the next steps.Finally:try the final execution when debugging.IS: The ID that determines whether two objects are con
"Save as ..." option, and then select this directory.12. Use the keyboard to switch back to the Terminal window, if you do not know how to use the keyboard switch, you can search the Internet.13. Go back to Terminal and see if you can use the command to see your newly created file, Internet search How to list the contents of the folder.Warning Sometimes you'll miss out on this step:Windows has Python but no path is configured correctly. Confirm that
fo = open ("./tmp/foo.txt","w+")
Fo.write ("Python is a gerat language.\nyeah its great!! \ni am Zhang Yapeng, who is you?\n ")
t_str = u' I am Zhang Yanpeng, what are you? '
Print (T_STR)
Fo.write (T_STR)
Fo.close ()
#read and Write
FR = Open ("./tmp/foo1.txt","r+")
FW = Open ("Foo_rw.txt","WB")
Done = 0;
LocalTime = Time.asctime (Time.localtime (Time.time ()))
Print "Local Current time:", LocalTime
Fw.
0. Origins"Learn Python the hard" Exercise 46 requires four Python package pip, distribute, Nose, Virtualenv, (original book author Special reminder: do not just D Onwload these packages and install them by hand. Instead See how other people recommend you install these packages and use them for your particular system.) to complete the exercise. 0.1 Learning Goals
of the "Python is the glue language, using Python to quickly generate a prototype of the program (and sometimes even the final interface of the program), and then to the special requirements of the part, with a more appropriateof the language Rewriting, than such as the Graphics rendering module in 3D games, performance requirements are particularly high, can be rewritten in C + +. "(3) share a very basic
. Therefore, in every day to do the project at the same time, must ensure that a certain amount of time, bad to fill the theoretical knowledge. This part of the book in the watercress and know that there are a lot of summary, you can search by themselves.2) Don't be too tangled up with meaningless questions, such as what frames are good, XX language is better than XX language. Pre-determined the practiced hand project, to concentrate on the accumulation of code volume, accumulate the basic knowl
being, it always comes when you understand.The results you should seeThe following is the result of a conversation with python after you have guessed the result yourself:$ pythonpython 2.5.1 (r251:54863, Feb 6, 19:02:12)[GCC 4.0.1 (Apple Inc. build 5465)] on DarwinType " Help "," copyright "," credits "or" license "for more information. True true2TrueBonus points Exercise
Python also has many
sentence in such a format: "The 1st animal is at 0 and was a bear." And then read upside down: "The animal at 0 are the 1st animal and is a bear."Use Python to check your answers.Bonus points Exercise
Search the Internet for knowledge of the ordinal number (ordinal number) and cardinality (cardinal number) and read it.
With your understanding of these different types of numbers, explain why "January 1, 2010" is 2010 instead of 2009? (Hin
to query (enter Q exit):" ") Company="'#pre-defined units whileCompany! ='Q': Department=input ()ifDepartment = ='Q': Break elif notDepartmentinchDic_of_ncepu:Print('The system is not queried, please re-enter') Continue Else: ifLen (dic_of_ncepu[department]) = = 1: Print(Dic_of_ncepu[department])Else: Print('Please enter the subordinate units of the department you are inquiring about: (press B to return, press Q to exit)') whileTrue
(0) FolderHigh-speed Python and error-prone (text processing)Python Text processing and JAVA/C10 minutes Learn the basic types of PythonHigh Speed Learning Python (actual combat)The way to Big data processing (10 minutes to learn
are like importedIf the class is like a module, then there should also be an import-like concept. In a class, this concept is called instantiation, and when a class is instantiated, it gets the object of a class.Create a class;Class MyStuff (object):def __init__ (self):SELF.A = ' How is it? 'def apple (self):Print ("I am classy apple")b = MyStuff () #类的实例化B.apple () #调用类的方法Print b.a# properties of the printing classAnalyzing the instantiation of a class this sentence actually
Environment: notepad++,python2.7.13Compile: Write the. py file first, and then run the script with the Python command in the terminal (the runtime terminal directory to be located in the running. py file directory)Exercise One:In the Python2 version, the double quotation mark "" and the single quotation mark "can be used for output without parentheses, and the statement ends without a semicolon;When you want to output quotes in a sentence, you can use
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.